package StudyCode.summary.myfile;

import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ConvertPathToFile {
	public static void main(String[] args) {
		Path path = Paths.get("E:", "Copy/2", "test.txt");

		File path_to_file = path.toFile();
		Path file_to_path = path_to_file.toPath();
		System.out.println("Path 转为文件的名称: " + path_to_file.getName());
		System.out.println("文件转为 Path: " + file_to_path.toString());
	}
}
